Two compact incremental prime sieves
نویسندگان
چکیده
منابع مشابه
Two Compact Incremental Prime Sieves
A prime sieve is an algorithm that finds the primes up to a bound n. We say that a prime sieve is incremental, if it can quickly determine if n+1 is prime after having found all primes up to n. We say a sieve is compact if it uses roughly √ n space or less. In this paper we present two new results: • We describe the rolling sieve, a practical, incremental prime sieve that takes O(n log logn) ti...
متن کاملImproved incremental prime number sieves
An algorithm due to Bengalloun that continuously enumerates the primes is adapted to give the rst prime number sieve that is simultaneously sublinear, additive, and smoothly incremental: { it employs only (n= log log n) additions of numbers of size O(n) to enumerate the primes up to n, equalling the performance of the fastest known algorithms for xed n; { the transition from n to n + 1 takes on...
متن کاملPrime sieves using binary quadratic forms
We introduce an algorithm that computes the prime numbers up to N using O(N/log logN) additions and N1/2+o(1) bits of memory. The algorithm enumerates representations of integers by certain binary quadratic forms. We present implementation results for this algorithm and one of the best previous algorithms.
متن کاملTrading Time for Space in Prime Number Sieves
A prime number sieve is an algorithm that nds the primes up to a bound n. We present four new prime number sieves. Each of these sieves gives new space complexity bounds for certain ranges of running times. In particular, we give a linear time sieve that uses only O(p n=(log log n) 2) bits of space, an O l (n= log log n) time sieve that uses O(n=((log n) l log log n)) bits of space, where l > 1...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: LMS Journal of Computation and Mathematics
سال: 2015
ISSN: 1461-1570
DOI: 10.1112/s1461157015000194